Optimal. Leaf size=213 \[ -\frac{a^2 (8 A+9 B+10 C) \sin ^3(c+d x)}{15 d}+\frac{a^2 (8 A+9 B+10 C) \sin (c+d x)}{5 d}+\frac{a^2 (9 A+12 B+10 C) \sin (c+d x) \cos ^3(c+d x)}{40 d}+\frac{a^2 (11 A+12 B+14 C) \sin (c+d x) \cos (c+d x)}{16 d}+\frac{(A+3 B) \sin (c+d x) \cos ^4(c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{15 d}+\frac{1}{16} a^2 x (11 A+12 B+14 C)+\frac{A \sin (c+d x) \cos ^5(c+d x) (a \sec (c+d x)+a)^2}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.441033, antiderivative size = 213, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.171, Rules used = {4086, 4017, 3996, 3787, 2633, 2635, 8} \[ -\frac{a^2 (8 A+9 B+10 C) \sin ^3(c+d x)}{15 d}+\frac{a^2 (8 A+9 B+10 C) \sin (c+d x)}{5 d}+\frac{a^2 (9 A+12 B+10 C) \sin (c+d x) \cos ^3(c+d x)}{40 d}+\frac{a^2 (11 A+12 B+14 C) \sin (c+d x) \cos (c+d x)}{16 d}+\frac{(A+3 B) \sin (c+d x) \cos ^4(c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{15 d}+\frac{1}{16} a^2 x (11 A+12 B+14 C)+\frac{A \sin (c+d x) \cos ^5(c+d x) (a \sec (c+d x)+a)^2}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4086
Rule 4017
Rule 3996
Rule 3787
Rule 2633
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \cos ^6(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac{A \cos ^5(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac{\int \cos ^5(c+d x) (a+a \sec (c+d x))^2 (2 a (A+3 B)+3 a (A+2 C) \sec (c+d x)) \, dx}{6 a}\\ &=\frac{A \cos ^5(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac{(A+3 B) \cos ^4(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{15 d}+\frac{\int \cos ^4(c+d x) (a+a \sec (c+d x)) \left (3 a^2 (9 A+12 B+10 C)+3 a^2 (7 A+6 B+10 C) \sec (c+d x)\right ) \, dx}{30 a}\\ &=\frac{a^2 (9 A+12 B+10 C) \cos ^3(c+d x) \sin (c+d x)}{40 d}+\frac{A \cos ^5(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac{(A+3 B) \cos ^4(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{15 d}-\frac{\int \cos ^3(c+d x) \left (-24 a^3 (8 A+9 B+10 C)-15 a^3 (11 A+12 B+14 C) \sec (c+d x)\right ) \, dx}{120 a}\\ &=\frac{a^2 (9 A+12 B+10 C) \cos ^3(c+d x) \sin (c+d x)}{40 d}+\frac{A \cos ^5(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac{(A+3 B) \cos ^4(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{15 d}+\frac{1}{5} \left (a^2 (8 A+9 B+10 C)\right ) \int \cos ^3(c+d x) \, dx+\frac{1}{8} \left (a^2 (11 A+12 B+14 C)\right ) \int \cos ^2(c+d x) \, dx\\ &=\frac{a^2 (11 A+12 B+14 C) \cos (c+d x) \sin (c+d x)}{16 d}+\frac{a^2 (9 A+12 B+10 C) \cos ^3(c+d x) \sin (c+d x)}{40 d}+\frac{A \cos ^5(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac{(A+3 B) \cos ^4(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{15 d}+\frac{1}{16} \left (a^2 (11 A+12 B+14 C)\right ) \int 1 \, dx-\frac{\left (a^2 (8 A+9 B+10 C)\right ) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 d}\\ &=\frac{1}{16} a^2 (11 A+12 B+14 C) x+\frac{a^2 (8 A+9 B+10 C) \sin (c+d x)}{5 d}+\frac{a^2 (11 A+12 B+14 C) \cos (c+d x) \sin (c+d x)}{16 d}+\frac{a^2 (9 A+12 B+10 C) \cos ^3(c+d x) \sin (c+d x)}{40 d}+\frac{A \cos ^5(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac{(A+3 B) \cos ^4(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{15 d}-\frac{a^2 (8 A+9 B+10 C) \sin ^3(c+d x)}{15 d}\\ \end{align*}
Mathematica [A] time = 0.966495, size = 170, normalized size = 0.8 \[ \frac{a^2 (120 (10 A+11 B+12 C) \sin (c+d x)+15 (31 A+32 (B+C)) \sin (2 (c+d x))+200 A \sin (3 (c+d x))+75 A \sin (4 (c+d x))+24 A \sin (5 (c+d x))+5 A \sin (6 (c+d x))+240 A c+660 A d x+180 B \sin (3 (c+d x))+60 B \sin (4 (c+d x))+12 B \sin (5 (c+d x))+720 B c+720 B d x+160 C \sin (3 (c+d x))+30 C \sin (4 (c+d x))+840 C d x)}{960 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.122, size = 304, normalized size = 1.4 \begin{align*}{\frac{1}{d} \left ({a}^{2}A \left ({\frac{\sin \left ( dx+c \right ) }{6} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{5}+{\frac{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{4}}+{\frac{15\,\cos \left ( dx+c \right ) }{8}} \right ) }+{\frac{5\,dx}{16}}+{\frac{5\,c}{16}} \right ) +{\frac{B{a}^{2}\sin \left ( dx+c \right ) }{5} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) }+{a}^{2}C \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +{\frac{2\,{a}^{2}A\sin \left ( dx+c \right ) }{5} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) }+2\,B{a}^{2} \left ( 1/4\, \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+3/2\,\cos \left ( dx+c \right ) \right ) \sin \left ( dx+c \right ) +3/8\,dx+3/8\,c \right ) +{\frac{2\,{a}^{2}C \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}}+{a}^{2}A \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +{\frac{B{a}^{2} \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}}+{a}^{2}C \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.960133, size = 400, normalized size = 1.88 \begin{align*} \frac{128 \,{\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A a^{2} - 5 \,{\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} + 30 \,{\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} + 64 \,{\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} B a^{2} - 320 \,{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{2} + 60 \,{\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 640 \,{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} + 30 \,{\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} + 240 \,{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2}}{960 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.523407, size = 373, normalized size = 1.75 \begin{align*} \frac{15 \,{\left (11 \, A + 12 \, B + 14 \, C\right )} a^{2} d x +{\left (40 \, A a^{2} \cos \left (d x + c\right )^{5} + 48 \,{\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right )^{4} + 10 \,{\left (11 \, A + 12 \, B + 6 \, C\right )} a^{2} \cos \left (d x + c\right )^{3} + 16 \,{\left (8 \, A + 9 \, B + 10 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 15 \,{\left (11 \, A + 12 \, B + 14 \, C\right )} a^{2} \cos \left (d x + c\right ) + 32 \,{\left (8 \, A + 9 \, B + 10 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{240 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30301, size = 473, normalized size = 2.22 \begin{align*} \frac{15 \,{\left (11 \, A a^{2} + 12 \, B a^{2} + 14 \, C a^{2}\right )}{\left (d x + c\right )} + \frac{2 \,{\left (165 \, A a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} + 180 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} + 210 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} + 935 \, A a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 1020 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 1190 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 1986 \, A a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 2568 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 2580 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 3006 \, A a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 2808 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 3180 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 1305 \, A a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 1860 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 2330 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 795 \, A a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 780 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 750 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{6}}}{240 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]